import React from "react";
import { Button } from "antd";
import NewsPublish from "../../../components/publish-manage/NewsPublish";
import usePublish from "./usePublish";

export default function Sunset() {
    // 使用自定义的Hooks
    const { dataSource, handleDelete }= usePublish(2)  // 2已下线

    return (
        <div>
            <NewsPublish dataSource={ dataSource } button={(id)=><Button type="dashed" onClick={()=>handleDelete(id)}>删除</Button>} />
        </div>
    );
}
